import { mapGetters, mapMutations, mapActions } from 'vuex'
import SkinColor from '@/assets/skin/index.js'
const appMixin = {
	computed: {
		app () {
			return getApp().globalData
		},
		skinMode () {
			return this.$store.getters['setting/GET_SKIN_MODE']
		},
		skinColor () {
			return SkinColor[this.skinMode]
		},
		bottomPopupHeight () {
			return this.windowHeight * (2 / 3)
		},
		$Router () {
			return getApp().globalData.$Router
		},
		$Route () {
			return getApp().globalData.$Route
		},
		$utils () {
			return getApp().globalData.$utils
		}
	},
	data () {
		return {
			windowWidth: 0,
			windowHeight: 0,
			windowTop: 0
		}
	},
	created () {
		this.windowTop = uni.getSystemInfoSync().safeArea.top
		this.windowWidth = uni.getSystemInfoSync().windowWidth
		this.windowHeight = uni.getSystemInfoSync().windowHeight
	}
}

export default appMixin;